{
  "properties" : { },
  "id" : "f97c36fcd3164dc694589e970291bc99",
  "script" : null,
  "groupId" : "4c0c509172534572bbe1809900aeafa9",
  "name" : "采集点配置-模型mib关系绑定",
  "createTime" : 1727071009947,
  "updateTime" : 1726049331970,
  "lock" : "1",
  "createBy" : "ndmp",
  "updateBy" : "ndmp",
  "path" : "bangModelMib",
  "method" : "GET",
  "parameters" : [ {
    "name" : "deviceModelId",
    "value" : "6896343486704796559",
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "current",
    "value" : "1",
    "description" : "",
    "required" : false,
    "dataType" : "Integer",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  }, {
    "name" : "size",
    "value" : "30",
    "description" : "",
    "required" : false,
    "dataType" : "Integer",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"status\": 200,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 0,\n        \"current\": 1,\n        \"size\": 30,\n        \"records\": []\n    }\n}",
  "description" : "",
  "requestBodyDefinition" : {
    "name" : "",
    "value" : { },
    "description" : "",
    "required" : false,
    "dataType" : "String",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ ]
  },
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : "",
    "defaultValue" : "",
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "code",
      "value" : "500",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "success",
      "value" : "false",
      "description" : "",
      "required" : false,
      "dataType" : "Boolean",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "",
      "description" : "",
      "required" : false,
      "dataType" : "Object",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "msg",
      "value" : "系统维护中，请稍后重试。",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : "",
      "defaultValue" : "",
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  }
}
================================
var sql="""
  SELECT
        r.*,m.INTERNAL,m.ALIAS,m.NAME,m.OID,m.PARENT_OID,m.BASE_TYPE,m.STATUS,m.ACCESS,m.KIND,m.MODULE,m.DESCRIPTION
        FROM ndmp_model_mib_relation r, ndmp_mib m WHERE r.MIB_ID = m.ID
        <if test=" deviceModelId != null and  deviceModelId !=''">
            and r.DEVICE_MODEL_ID = #{deviceModelId}
        </if>
        <if test=" oid != null and  oid !=''">
            and m.oid like concat('%', #{ oid},'%')
        </if>
        <if test=" name != null and  name !=''">
            and m.name like concat('%', #{ name},'%')
        </if>
        <if test=" kind != null and  kind !=''">
            and m.kind like concat('%', #{ kind},'%')
        </if>
        <if test=" alias != null and  alias !=''">
            and m.alias like concat('%', #{ alias},'%')
        </if>
        <if test=" module != null and  module !=''">
            and m.module like concat('%', #{ module},'%')
        </if>
"""

var res =db.page(sql,size ,current-1)

if (res.total > 0) {


    
    return res
} else {
     res.records=[]
    return res
}

 